<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/11
 * Time: 19:48
 */
header("Content-Type:application/json;charset=utf-8");
if(isset($_REQUEST["gid"])){
    $str=file_get_contents("./data/goodsData.json");
    $listArr=json_decode($str);
    foreach ($listArr as $item){
        if($item->gid==$_REQUEST["gid"]){
            print_r(json_encode($item));
            return;
        }
    }
}